/*
 Navicat Premium Data Transfer

 Source Server         : 49.232.241.216
 Source Server Type    : MySQL
 Source Server Version : 80022
 Source Host           : 49.232.241.216:3306
 Source Schema         : manager

 Target Server Type    : MySQL
 Target Server Version : 80022
 File Encoding         : 65001

 Date: 08/03/2021 00:55:30
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for t_button
-- ----------------------------
DROP TABLE IF EXISTS `t_button`;
CREATE TABLE `t_button` (
  `id` int NOT NULL,
  `menu_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `button_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `button_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `p_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `pp_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of t_button
-- ----------------------------
BEGIN;
INSERT INTO `t_button` VALUES (1, '2', '撒打发斯蒂芬', '这是button1', NULL, NULL);
INSERT INTO `t_button` VALUES (2, '2', '撒旦法', '这是 buttono2', NULL, NULL);
INSERT INTO `t_button` VALUES (3, '3', '1', '撒地方撒地方', NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for t_company
-- ----------------------------
DROP TABLE IF EXISTS `t_company`;
CREATE TABLE `t_company` (
  `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
  `name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '公司单位名称',
  `type` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '1 进货公司 2 出货公司 单位',
  `address` varchar(32) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `t_company_pk` (`name`,`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of t_company
-- ----------------------------
BEGIN;
INSERT INTO `t_company` VALUES ('001', '元合全', '2', NULL, NULL);
INSERT INTO `t_company` VALUES ('007', '拼多多自', '2', '河北省邯郸市馆陶县', '15732186607');
INSERT INTO `t_company` VALUES ('008', '庄固      奎', '2', '河北省邯郸市馆陶县王桥乡', '18802346788');
INSERT INTO `t_company` VALUES ('888', '馆陶    张贺', '2', NULL, NULL);
INSERT INTO `t_company` VALUES ('C001', '其他散户', '2', NULL, NULL);
INSERT INTO `t_company` VALUES ('C002', '凯粮油', '2', NULL, NULL);
INSERT INTO `t_company` VALUES ('C003', '临漳海勇粮油', '2', NULL, NULL);
INSERT INTO `t_company` VALUES ('C004', '麻呼寨春风粮油', '2', NULL, NULL);
INSERT INTO `t_company` VALUES ('C007', '洪雷', '2', NULL, NULL);
INSERT INTO `t_company` VALUES ('C008', '莘县粮油', '2', NULL, NULL);
INSERT INTO `t_company` VALUES ('c009', '冠县拼多多1', '2', NULL, NULL);
INSERT INTO `t_company` VALUES ('c010', '冠县拼多多2', '2', NULL, NULL);
INSERT INTO `t_company` VALUES ('C08', '冠县粮油', '2', NULL, NULL);
INSERT INTO `t_company` VALUES ('J001', '进货其他', '1', NULL, NULL);
INSERT INTO `t_company` VALUES ('J002', '锐马', '1', NULL, NULL);
INSERT INTO `t_company` VALUES ('J004', '法寺面粉厂', '1', NULL, NULL);
INSERT INTO `t_company` VALUES ('J006', '老仲粮油', '1', NULL, NULL);
INSERT INTO `t_company` VALUES ('j007', '拼多多', '1', NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for t_detail
-- ----------------------------
DROP TABLE IF EXISTS `t_detail`;
CREATE TABLE `t_detail` (
  `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'id',
  `batch_date` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '日期',
  `goods_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品id',
  `goods_price` decimal(10,2) DEFAULT NULL COMMENT '价钱',
  `goods_amount` int DEFAULT NULL COMMENT '数量',
  `goods_mark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品备注',
  `type` int DEFAULT NULL COMMENT '1 进货 2 出货',
  `curr_time` varchar(25) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '填写日期',
  `status` int DEFAULT NULL COMMENT '状态 1 正常 0 删除',
  `company_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '来自谁',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `t_detail_goods_id_index` (`goods_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of t_detail
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for t_goods
-- ----------------------------
DROP TABLE IF EXISTS `t_goods`;
CREATE TABLE `t_goods` (
  `id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'id',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品名称',
  `type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品种类，1：进货商品 2 出货商品',
  `status` tinyint(1) DEFAULT '1' COMMENT '1 启用 2 禁用',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of t_goods
-- ----------------------------
BEGIN;
INSERT INTO `t_goods` VALUES ('0007', '盐', '1', 0);
INSERT INTO `t_goods` VALUES ('001', '刀削面', '2', 1);
INSERT INTO `t_goods` VALUES ('002', '3斤/件', '2', 1);
INSERT INTO `t_goods` VALUES ('003', '5斤/件', '2', 1);
INSERT INTO `t_goods` VALUES ('CHU001', '刀削面', '2', 0);
INSERT INTO `t_goods` VALUES ('CHU002', '麻花面', '2', 0);
INSERT INTO `t_goods` VALUES ('CHU003', '龙须面', '2', 0);
INSERT INTO `t_goods` VALUES ('CHU004', '果蔬面', '2', 0);
INSERT INTO `t_goods` VALUES ('CHU006', '面粉', '2', 0);
INSERT INTO `t_goods` VALUES ('JIN000', '日常消费', '1', 0);
INSERT INTO `t_goods` VALUES ('JIN001', '原味面', '1', 0);
INSERT INTO `t_goods` VALUES ('JIN002', '富强面', '1', 0);
INSERT INTO `t_goods` VALUES ('JIN003', '淀粉', '1', 0);
INSERT INTO `t_goods` VALUES ('JIN006', '纯天然', '1', 0);
INSERT INTO `t_goods` VALUES ('s001', '上月结存', '2', 0);
INSERT INTO `t_goods` VALUES ('x001', '纸箱', '1', 0);
COMMIT;

-- ----------------------------
-- Table structure for t_menu
-- ----------------------------
DROP TABLE IF EXISTS `t_menu`;
CREATE TABLE `t_menu` (
  `id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '主键',
  `menu_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '菜单名称',
  `path` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '菜单路径',
  `parent_id` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '父id',
  `menu_sort` int DEFAULT NULL COMMENT '菜单排序',
  KEY `idx` (`parent_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of t_menu
-- ----------------------------
BEGIN;
INSERT INTO `t_menu` VALUES ('102', '入货管理', '/ingoods', NULL, 2);
INSERT INTO `t_menu` VALUES ('103', '出货管理', '/outgoods', NULL, 3);
INSERT INTO `t_menu` VALUES ('104', '参数管理', NULL, NULL, 6);
INSERT INTO `t_menu` VALUES ('1041', '商品管理', '/goods', '104', 1);
INSERT INTO `t_menu` VALUES ('1042', '单位管理', '/company', '104', 2);
INSERT INTO `t_menu` VALUES ('105', '凭据管理', '/bill', NULL, 4);
INSERT INTO `t_menu` VALUES ('101', '我的首页', '/home', NULL, 1);
INSERT INTO `t_menu` VALUES ('106', '我的统计', '/statistics', NULL, 5);
COMMIT;

-- ----------------------------
-- Table structure for t_role
-- ----------------------------
DROP TABLE IF EXISTS `t_role`;
CREATE TABLE `t_role` (
  `id` int NOT NULL,
  `role_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `role_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `create_time` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of t_role
-- ----------------------------
BEGIN;
INSERT INTO `t_role` VALUES (1, '出行端', '啦啦啦啦', '2020-09-08 12:00:00');
INSERT INTO `t_role` VALUES (2, '出租端', '这里是出租端', '2020-09-08 12:00:00');
COMMIT;

-- ----------------------------
-- Table structure for t_role_button
-- ----------------------------
DROP TABLE IF EXISTS `t_role_button`;
CREATE TABLE `t_role_button` (
  `id` int NOT NULL,
  `role_id` int DEFAULT NULL,
  `button_id` int DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of t_role_button
-- ----------------------------
BEGIN;
INSERT INTO `t_role_button` VALUES (1, 1, 1);
INSERT INTO `t_role_button` VALUES (2, 2, 1);
INSERT INTO `t_role_button` VALUES (3, 1, 2);
INSERT INTO `t_role_button` VALUES (4, 2, 2);
INSERT INTO `t_role_button` VALUES (5, 1, 3);
COMMIT;

-- ----------------------------
-- Table structure for t_user
-- ----------------------------
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
  `account` varchar(15) NOT NULL,
  `nick_name` varchar(255) DEFAULT NULL COMMENT '用户名',
  `avatar_url` varchar(255) DEFAULT NULL,
  `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '账户密码',
  `create_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建时间',
  `update_time` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx` (`id`,`password`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of t_user
-- ----------------------------
BEGIN;
INSERT INTO `t_user` VALUES (100, '100', '账户1', NULL, '49312e179ec81d2a7926e3b614769722', '2019-11-11 12:12:12', '2019-11-11 12:12:12');
INSERT INTO `t_user` VALUES (101, '101', '账户2', NULL, '2f7ae0463d6a47b7907b25b9164e02a9', '2019-11-11 12:12:12', '2019-11-11 12:12:12');
COMMIT;

-- ----------------------------
-- Table structure for t_user_role
-- ----------------------------
DROP TABLE IF EXISTS `t_user_role`;
CREATE TABLE `t_user_role` (
  `id` int NOT NULL,
  `user_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `role_id` int DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of t_user_role
-- ----------------------------
BEGIN;
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
